package edu.tyut.game.ui.person

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.map
import androidx.lifecycle.switchMap
import edu.tyut.game.logic.FeedbackRepository
import edu.tyut.game.logic.model.Feedback

class FeedbackViewModel : ViewModel() {

    private val liveData = MutableLiveData<Feedback>()
    val resData = liveData.switchMap {
        FeedbackRepository.sendFeedback(it)
    }
    fun sendFeedback(feedback: Feedback){
        liveData.value = feedback
    }
}